package action;

import java.util.Map;

import org.apache.struts2.ServletActionContext;
import org.apache.struts2.interceptor.ApplicationAware;
import org.apache.struts2.interceptor.RequestAware;
import org.apache.struts2.interceptor.SessionAware;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class BaseAction extends ActionSupport implements SessionAware,
		ApplicationAware, RequestAware {

	/**
	 * 2014年6月16日23:16:31
	 */
	private static final long serialVersionUID = 7216392848503039777L;
	protected Map<String, Object> request = null;
	protected Map<String, Object> session = null;
	protected Map<String, Object> application = null;
	protected String RefererURL = ServletActionContext.getRequest().getHeader(
			"Referer");
	protected String APP_BASE = ServletActionContext.getRequest()
			.getScheme()
			+ "://"
			+ ServletActionContext.getRequest().getServerName()
			+ ":"
			+ ServletActionContext.getRequest().getServerPort()
			+ ServletActionContext.getRequest().getContextPath() + "/";

	public void setRequest(Map<String, Object> arg0) {
		// TODO init request
		this.request = arg0;

	}

	public void setApplication(Map<String, Object> arg0) {
		// TODO init application
		this.application = arg0;
	}

	public void setSession(Map<String, Object> arg0) {
		// TODO init session
		this.session = arg0;
	}

}
